define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'sign.config/index',
        add_url: 'sign.config/add',
        edit_url: 'sign.config/edit',
        delete_url: 'sign.config/delete',
        export_url: 'sign.config/export',
        modify_url: 'sign.config/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {type: 'checkbox'},                    {field: 'id', title: 'id'},                    {field: 'first_day', title: '一天 签到获得积分'},                    {field: 'second_day', title: '2天  签到获得积分'},                    {field: 'third_day', title: '3天  签到获得积分'},                    {field: 'fourth_day', title: '4天  签到获得积分'},                    {field: 'fifth_day', title: '5天 签到获得积分'},                    {field: 'sixth_day', title: '6天 签到获得积分'},                    {field: 'seventh_day', title: '7<=  签到获得积分'},                    {field: 'status', title: '状态: 0-关闭 1-开启', templet: ea.table.switch},                    {field: 'create_time', title: 'create_time'},                    {width: 250, title: '操作', templet: ea.table.tool},
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});